package com.weipai.springboot.module.dao;

import com.weipai.springboot.model.ProductCategory;
import com.weipai.springboot.model.api.Tree;

import java.util.List;
import java.util.Map;

/**
 * @Author: 曹朋飞
 * @Date: 2018/09/12 10:58
 */
public interface ProductCategoryDao {
    


    int insert(ProductCategory productCategory);

    int updateByPrimaryKey(ProductCategory productCategory);

    ProductCategory getProductCategoryById(String id);

    List<ProductCategory> selectAllByRankDel(int del, String rank, String sort, String way, String id);



    int updateStatus(String id, Integer status);

    List<ProductCategory> getAllProductCategory();
    /**
     *
     * 首页三级分类优化
     * @author gusl
     * @date 2019/5/30 14:34
     * @param  []
     * @return java.util.List<com.weipai.springboot.model.ProductCategory>
     */

    List<Tree> getAllProductCategoryV2();

    List<ProductCategory> getChildCategory(String pid);

    List<Map<String,Object>> getCategoryBrands(String id);

    List<Map<String,Object>> getSearchPropertyByCategory(String id);

    List<ProductCategory> getThirdCategoryByTopId(String id);

    int batchDeleteById(String[] id);

    List<Map<String,Object>> getProductCategoryByPid(String parentId);

    int getProductCategoryByName(String productCategoryName);

    Integer getProductId(String id);

    Integer getValidChildCountById(String id);
}
